<meta http-equiv="refresh" content="1; url='<?=addslashes($url)?>'">
<script>
var next=decodeURIComponent(location.search.match(/next\=(.*?)(?=&)/)[1]);
if (sessionStorage) {
	if (next) sessionStorage.setItem('redirect',next);
	else sessionStorage.setItem('redirect',decodeURIComponent('<?=urlencode($default)?>'));
}
location.href=decodeURIComponent('<?=urlencode($url)?>');
</script>